1. Field of the Invention
This invention relates to a method of an apparatus for distinguishing the types of pixels making up an original, and more particularly to a method of and an apparatus for distinguishing the types of pixels making up an original, which are used, for instance, in a stencil printer which makes a stencil by image wise perforating a heat-sensitive stencil material and a print is made from the stencil, and a copier or a printer in which a latent image is formed on a photosensitive medium by electrophotography or the like and a toner image obtained by developing the latent image is transferred to a printing paper or a heat-sensitive paper.
2. Description of the Related Art
In the fields of plate making and printing, there has been put into practice a process in which an original, in which binary images such as a line drawing and characters and tone images such as a picture and halftone dots mingle together (such an original will be referred to as a xe2x80x9ccomplex originalxe2x80x9d, hereinbelow), is read by an image scanner, a multivalued image signal sampled in a main scanning direction and a sub-scanning direction pixel by pixel is obtained, the multivalued image signal is converted into a binary image signal, and a plate or a print is made from the binary image signal.
In order to obtain a desirable output when a complex original is output through an image processing apparatus, generally, the region of the binary image is subjected to a binary image density conversion in which the density of each pixel is converted to a maximum density or a minimum density on the basis of a single threshold value, the region of the tone image is subjected to a tone image density conversion in which the density of each pixel is converted taking into account the properties of the input/output system so that the tone properties of the original image are preserved, and then the region of the binary image is binary-coded by a simple binary-coding method using a single threshold value while the region of the tone image is binary-coded by a pseudo-halftone expressing method such as a dither method and an error diffusion method. The density conversion is carried out on the basis of a density conversion curve (function) and/or LUT (lookup table) exclusive to the type of the image. That is, a density conversion curve and/or LUT exclusive to the binary image are used for density conversion of the region of the binary image and a density conversion curve and/or LUT exclusive to the tone image are used for density conversion of the region of the tone image.
Accordingly, it is necessary to determine the type of each region, that is, to distinguish the binary image region from the tone image region. In other words, it is necessary to distinguish the type of each pixel (the type of image which the pixel makes up) in order to determine the density conversion curve and/or the LUT according to which the density conversion is to be carried out on the pixel. There have been proposed various methods of distinguishing the binary image region and the tone image region from each other.
For example, in Japanese Unexamined Patent Publication No. 5(1993)-114045, a method of distinguishing the types of images in which an original image is divided into a plurality of blocks each including mxc3x97n pixels, properties of the image in each block are detected, and determining which of a binary image, a tone image and a blank (background), the image in each block is on the basis of the properties detected, with the result of the determination being corrected, if necessary, taking into account the properties of the images in blocks near the block.
However, the method gives rise to a problem that when each block is set in a size larger than such a size that the properties of the image therein can be visually determined (will be referred to as xe2x80x9cthe visually distinguishable sizexe2x80x9d, hereinbelow), there is a fear that both a region of characters and a region of a picture exist in one block (such a block will be referred to as xe2x80x9ca complex blockxe2x80x9d, hereinbelow). That is, since the image even in a complex block must be determined to be a binary image or a tone image, the result of the determination is inherently partly true and partly not true.
When a density conversion is carried out on pixels in each block on the basis of the result of the determination, the picture region is output to be higher in density when the block is determined to be a binary image block, since a density conversion is carried out on a picture image region by use of the density conversion curve exclusive to the binary image. Conversely, if the block is determined to be a tone image block, the character region is output to be lower in density as compared with when the density conversion is carried out by use of the density conversion curve exclusive to the tone image.
To the contrast when the block is set in a size smaller than the xe2x80x9cvisually distinguishable sizexe2x80x9d, it becomes difficult to determine whether an image in each block is a part of a thick character or a high density portion of a picture. Also in this case, the image in each block must be determined to be a binary image or a tone image, the result of the determination is inherently partly true and partly not true.
When a density conversion is carried out on pixels in each block on the basis of the result of the determination, the picture region is output to be higher in density when the block is determined to be a binary image block, since a density conversion is carried out on a picture image region by use of the density conversion curve exclusive to the binary image. Conversely, if the block is determined to be a tone image block, the character region is output to be lower in density as compared with when the density conversion is carried out by use of the density conversion curve exclusive to the tone image.
If the densities of pixels are output to be higher or lower than a correct density due to wrong determination, a density step is generated between a part correctly determined and a part incorrectly determined and the observer feels strange.
In view of the foregoing observations and description, the primary object of the present invention is to provide a method and an apparatus which can distinguish more precisely the binary image region and the tone image region (can more precisely distinguish the types of pixels) in a complex original, in which binary images and tone images mingle together.
In accordance with the present invention, the original image is divided into a plurality of blocks each being not smaller than xe2x80x9cthe visually distinguishable sizexe2x80x9d and the kind of the image in each block is determined on the basis of the properties of the block. The pixels in the block which can be readily determined to be a binary image block by the xe2x80x9cblock-by-blockxe2x80x9d determination are all determined to be pixels of a binary image (that is, the pixels are of a binary image type), and, for example, are subjected to density conversion according to the density conversion curve exclusive to the binary image. Similarly, the pixels in the block which can be readily determined to be a tone image block by the xe2x80x9cblock-by-blockxe2x80x9d determination are all determined to be pixels of a tone image (that is, the pixels are of a tone image type), and for example, are subjected to density conversion according to the density conversion curve exclusive to the tone image. On the other hand, the types of pixels in the block which cannot be readily determined to be a binary image block or a tone image block by the xe2x80x9cblock-by-blockxe2x80x9d determination (will be referred to as xe2x80x9can indeterminate image blockxe2x80x9d, hereinbelow) are determined pixel by pixel.
That is, in accordance with a first aspect of the present invention, there is provided a method of distinguishing the types of pixels of an image made up of a plurality of pixels arranged in a main scanning direction and a sub-scanning direction comprising the steps of
carrying out a block-by-block determination in which the image is divided into a plurality of blocks each substantially larger than a visually distinguishable size, properties of the images in the blocks representing the probability that the image is a binary image are detected, probability that the image in each block is a binary image is determined on the basis of the detected properties of the image in the block, each block is determined to be a binary image block when the probability is higher than a first predetermined value, to be a tone image block when the probability is lower than a second predetermined value, and to be an indeterminate image block when the probability is not higher than the first predetermined value and not lower than the second predetermined value, and the pixels in the blocks which are determined to be a binary image block are all determined to be pixels of a binary image while the pixels in the blocks which are determined to be a tone image block are all determined to be pixels of a tone image, and
carrying out a pixel-by-pixel determination on the blocks, which are determined to be an indeterminate image block by the block-by-block determination, in which properties of each of the pixels in each of the indeterminate blocks representing the probability that the pixel is of a binary image are detected, and whether the pixel is a pixel of a binary image is determined on the basis of the detected properties.
For example, the pixels which are determined to be those of a binary image in the pixel-by-pixel determination are subjected to density conversion according to the density conversion curve exclusive to the binary image. The pixels which are not determined to be those of a binary image in the pixel-by-pixel determination may be considered to be those of a tone image, and for example, are subjected to density conversion according to the density conversion curve exclusive to the tone image.
The size of the blocks should be not smaller than the visually distinguishable size so that whether the image in each block is a part of a thick character or a high density part of a picture can be readily determined and whether the image in each block is a part of an edge of a character or a part of an edge of a picture can be readily determined. For example, the size of the blocks maybe substantially equal to the visually distinguishable size, e.g., 1 cmxc3x971 cm as measured on the original.
The probability that an image is a binary image is correlative to the probability that the image is a tone image. That is, as the probability that an image is a binary image increases, the probability that the image is a tone image decreases, and as the probability that an image is a tone image increases, the probability that the image is a binary image decreases. Accordingly, determining the probability that an image is a binary image is equivalent to determining the probability that an image is a binary image. That is, in the present invention properties of the images in the blocks representing the probability that the image is a binary image may be detected by detecting properties of the images in the blocks representing the probability that the image is a tone image.
It is preferred that properties of the image in each block representing the probability that the image is a binary image is detected by calculating a characteristic value for the block. For example, edge pixels (pixels which are high in probability of being a part of an edge) may be detected on the basis of change in density of the pixels in the block and the proportion of the edge pixels in the block may be calculated. Otherwise, the proportion of white pixels having a density lower than the density of the background may be calculated on the basis of a density distribution diagram (e.g., a density histogram whose abscissa and ordinate respectively represent the density and the frequency at which pixels having the density appear), the central value of the range of the values (densities) of pixels (e.g., the mid-value, the mean value or the median) may be calculated or the width of the range of the values of pixels may be calculated.
xe2x80x9cWhich of the binary image, the tone image and the indeterminate image, the image in each block isxe2x80x9d is determined on the basis of the characteristic values by the use of, for instance, an LUT method or a fuzzy theory. When characteristic values calculated from both the viewpoints of the density change in the block and the density distribution in the block are used, the distinguishing accuracy can be higher than when characteristic values calculated from a single viewpoint are used.
It is preferred that the properties of each of the pixels representing the probability that the pixel is of a binary image include at least one of information on the probability that the pixel represents a high density, information on the probability that the pixel is of a thin line drawing, information on sharpness of an edge and information on the probability that the pixel is of an edge so that pixels of a larger number of types of binary image can be distinguished. For example, whether or not each pixel is a pixel representing a high density, whether or not each pixel is of a thin line drawing, whether or not each pixel is of an edge may be determined according to the densities of adjacent pixels, and the result of the determination may be output as a signal representing the probability that the pixel is of a binary image. Then whether each pixel in the blocks which are determined to be an indeterminate block is of a binary image is determined on the basis of the signal by the use of, for instance, an LUT method or a fuzzy theory.
It is preferred that on which level between the tone image and the binary image each of the blocks which are determined to be an indeterminate image block is (this level will be referred to as the xe2x80x9cimage levelxe2x80x9d, hereinbelow) be determined on the basis of said properties of the image in the block representing the probability that the image is a binary image and each of the pixels in the block which are not determined to be of a binary image out of the pixels in the blocks which are determined to be an indeterminate image block (such a pixel will be referred to as a xe2x80x9cnon-binary pixel in an indeterminate image blockxe2x80x9d hereinbelow) be considered to be on the image level equal to the image level of the block. It is further preferred that on which level between the tone image and the binary image each of the non-binary pixels in an indeterminate image block is be determined on the basis of properties of the pixel representing the probability that the pixel is of a binary image.
In the case where the image levels of the non-binary pixels in an indeterminate image block are determined in the manner described above, for instance, the non-binary pixels in an indeterminate image block may be subjected to density conversion according to the density conversion curve which has been set exclusively to the image level.
On which level between the tone image and the binary image, each of the non-binary pixels in an indeterminate image block is need not be determined on the basis of the same properties and/or the same reference as those on the basis of which whether the pixel is a pixel of a binary image is determined. For example, the basis for the latter determination may be less strict than that for the former determination.
In accordance with a second aspect of the present invention, there is provided an apparatus for carrying out the method of the first aspect for distinguishing the types of pixels of an image made up of a plurality of pixels arranged in a main scanning direction and a sub-scanning direction comprising
a block-by-block determination means which carries out a block-by-block determination in which the image is divided into a plurality of blocks each substantially larger than a visually distinguishable size, properties of the images in the blocks representing the probability that the image is a binary image are detected, probability that the image in each block is a binary image is determined on the basis of the detected properties of the image in the block, each block is determined to be a binary image block when the probability is higher than a first predetermined value, to be a tone image block when the probability is lower than a second predetermined value, and to be an indeterminate image block when the probability is not higher than the first predetermined value and not lower than the second predetermined value, and the pixels in the blocks which are determined to be a binary image block are all determined to be pixels of a binary image while the pixels in the blocks which are determined to be a tone image block are all determined to be pixels of a tone image, and
a pixel-by-pixel determination means which carries out a pixel-by-pixel determination on the blocks, which are determined to be an indeterminate image block by the block-by-block determination, in which properties of each of the pixels in each of the indeterminate blocks representing the probability that the pixel is of a binary image are detected, and whether the pixel is a pixel of a binary image is determined on the basis of the detected properties.
It is preferred that the block-by-block determination means determines on which image level between the tone image and the binary image each of the blocks which are determined to be an indeterminate image block is on the basis of said properties of the image in the block representing the probability that the image is a binary image, and the pixel-by-pixel determination means determines each of the pixels in the block which are not determined to be of a binary image out of the pixels in the blocks which are determined to be an indeterminate image block to be on the image level equal to the image level of the block.
It is further preferred that the pixel-by-pixel determination means determines on which level between the tone image and the binary image each of the non-binary pixels in an indeterminate image block is on the basis of properties of the pixel representing the probability that the pixel is of a binary image.
In accordance with the present invention, blocks which are made up of both pixels of a character and pixels of a picture and cannot be determined to be a character block or a picture block are determined to be indeterminate blocks, and at least the pixels in the blocks determined to be an indeterminate blocks are determined to be of a character or of a picture pixel by pixel. Thus, the types of pixels in the blocks in which binary images and tone images mingle together and which cannot be simply determined to be a binary image block or a tone image block by the xe2x80x9cblock-by-blockxe2x80x9d determination can be precisely determined. Further since each block is larger than the visually distinguishable size, whether an image in each block is a part of a thick character or a high density portion of a picture can be readily determined.
Thus in accordance with the present invention, the binary image region and the tone image region can be more precisely distinguished from each other, and accordingly, when the image signal is subjected to density conversion, the density of each pixel can be more adequately converted and an image free from the drawbacks inherent to the conventional method, that is, densities of pixels are output to be higher or lower than a correct density due to wrong determination, and a density step is generated between a part correctly determined and a part incorrectly determined, which makes the observer to feel strange.
When the image level of the blocks which are determined to be an indeterminate image block is determined, even if wrong determination occurs due to coexistence of pixels of a thick character and pixels of a high density part of a picture or pixels of an edge portion of a character and pixels of a part of a picture like an edge in one block, the density step generated due to the wrong determination can be lowered.